"""
用来获取一些路径的工具类
"""
import os


def get_project_path():
    """获取当前项目的绝对路径"""
    project_path = os.path.abspath(os.path.join(os.path.realpath(__file__), "..", ".."))
    return project_path


def get_temp_path():
    """创建日志存放的文件夹，返回日志文件夹的绝对路径"""
    temp_path = os.environ.get("temp", "")
    return temp_path


def get_file_path(path_str=None):
    """合并路径"""
    project_path = get_project_path()
    file_path = os.path.join(project_path, path_str)
    return file_path


def get_exe_path():
    """当软件打包好之后，获取当前软件运行所在的路径"""
    exe_path = os.getcwd()
    return exe_path
